package com.pxst.sys.req;

import com.pxst.entity.Insert;
import com.pxst.entity.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 *
 */

@Data
public class AdminRoleReq {

    @NotNull(message = "角色id不能为空",groups = {Update.class})
    @ApiModelProperty(value = "角色id",required = true)
    private Long id;

    @NotBlank(message = "角色名称不能为空", groups = {Insert.class})
    @ApiModelProperty(value = "角色名称",required = true)
    private String roleName;

    @NotBlank(message = "角色编码不能为空", groups = {Insert.class})
    @ApiModelProperty(value = "角色编码")
    private String roleCode;

    @NotNull(message = "状态不能为空",groups = {Insert.class,Update.class})
    @ApiModelProperty(value = "是否启用(0否，1是)",required = true)
    private Integer isUse;

    @NotNull(message = "权限集合不能为空",groups = {Insert.class})
    @ApiModelProperty(value = "权限集合",required = true)
    private Map<String,String> permissions;

    @ApiModelProperty(value = "超级管理员, 此角色不允许被修改及移除(0否，1是)")
    private Integer super_admin;
}
